package com.zhaoyu.admin;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@MapperScan("com.zhaoyu.admin.mapper") // 扫描mapper
@ComponentScan(basePackages = {"com.zhaoyu.admin"}) // 扫描zhaoyu-leadnews-admin模块包下的所有类
@ComponentScan(basePackages = {"com.zhaoyu.apis"}) // 扫描zhaoyu-leadnews-apis模块包下的所有类
@ComponentScan(basePackages = {"com.zhaoyu.model"}) // 扫描zhaoyu-leadnews-model模块包下的所有类
@ComponentScan(basePackages = {"com.zhaoyu.common"}) // 扫描zhaoyu-leadnews-common模块包下的所有类
@ComponentScan(basePackages = {"com.zhaoyu.utils"}) // 扫描zhaoyu-leadnews-utils模块包下的所有类
//@ComponentScan(basePackages = {"com.zhaoyu.seata"}) // 扫描zhaoyu-leadnews-seata模块包下的所有类
@EnableDiscoveryClient // 开启注册中心
@EnableFeignClients("com.zhaoyu") // 开启远程调用Feign(扫描com.zhaoyu包下的所有类)
public class AdminApplication {

    public static void main(String[] args)   {
        SpringApplication.run(AdminApplication.class, args);
    }

}